﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Text;
using TL_Cloud.Models.BookShop;

namespace TL_Cloud.ViewModels.BookShop.BKInfo
{
    /// <summary>
    /// 图书信息
    /// </summary>
    public class BKInfoResource : BKInfoUpdateResource
    {
        public string BookId { get; set; }

        public int? ApproveStatus { get; set; }
        public string ApproveUserId { get; set; }
        public string ApproveRemark { get; set; }
        public DateTime? ApproveDate { get; set; }
        public int? OpenCount { get; set; }
        public int? CollectCount { get; set; }
        public int? RecommendCount { get; set; }

    }
    /// <summary>
    /// 图书基础信息
    /// </summary>
    public class BKInfoBasicResource
    {
        public string BookName { get; set; }
        public string BKTypeId { get; set; }
        public string Author { get; set; }
        public string Pulisher { get; set; }
        public string Isbn { get; set; }
        public string ConverUrl { get; set; }
        public string Introduce { get; set; }
        public string Remark { get; set; }
    }

    /// <summary>
    /// 图形信息更新
    /// </summary>
    public class BKInfoUpdateResource : BKInfoBasicResource
    {
        public int? EnabledMark { get; set; }
    }

    public class BKInfoMappingProfile : Profile
    {
        public BKInfoMappingProfile()
        {
            CreateMap<Bk_Info,BKInfoResource>();
            CreateMap<BKInfoResource, Bk_Info>();
            CreateMap<BKInfoBasicResource, Bk_Info>();
            CreateMap<BKInfoUpdateResource, Bk_Info>();
        }
    }
}
